<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .img {
            width: 200px;
            height: 200px;
            border-radius: 50%;
            position: relative;
            background: url(./images/tim1g.jpg) no-repeat;
            background-size: cover;
            cursor: pointer;
        }

        .img::after,
        .img::before {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            content: "";
        }

        .img::before {
            background-color: antiquewhite;
        }

        .img::after {
            /* 继承父元素的 */
            background: inherit;
            /* 裁减 */
            clip-path: circle(0% at 50% 50%);

            /* 过渡 */
            transition: all .5s;

        }

        /* 鼠标移上去再完全展示 */
        .img:hover::after {
            clip-path: circle(50% at 50% 50%);

        }
    </style>
</head>

<body>

    <!-- <img src="./images/tim1g.jpg" alt=""> -->
    <div class="img">


    </div>

    <div>
        思路：
        <p>1. 分三层，用伪元素实现两层</p>
        <p>2. 第二层作为蒙版，第三层直接继承父元素的背景图，然后进行裁剪</p>
        <p>3. 鼠标移上去再将第三层裁剪为50%</p>
    </div>

</body>

</html>